package com.zboot.zbootadmin.common.utils;

import lombok.extern.slf4j.Slf4j;

import java.io.File;

/**
 * @Author: zyt
 * @Description:文件工具类
 * @Date: Created in 21:33 2020/6/27
 */
@Slf4j
public class FileUtils {

    public  static void removeDir(File dir) {
        File[] files=dir.listFiles();
        for(File file:files){
            if(file.isDirectory()){
                removeDir(file);
            }else{
                file.delete();
                log.info(file+":"+file.delete());
            }
        }
        log.info(dir+":"+dir.delete());
    }
}
